import 'package:flutter/material.dart';
import 'package:flutter_douban/tool_views/cached_network_Image.dart';

class ClassRoom extends StatefulWidget {
  final String iconStr;
  final String titleStr;
  const ClassRoom({Key? key,required this.iconStr,required this.titleStr}) : super(key: key);

  @override
  _ClassRoomState createState() => _ClassRoomState();
}

class _ClassRoomState extends State<ClassRoom> {
  @override
  Widget build(BuildContext context) {
    return Container(
        margin: EdgeInsets.only(left: 20, right: 20, top: 30, bottom: 10),
        child: Column(
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                CachedImage(
                    url:
                    widget.iconStr,
                    width: 110,
                    height: 36),
                InkWell(
                  child: Text('常见问题',
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          fontSize: 13,
                          color: Color.fromRGBO(94, 146, 140, 1),
                          fontWeight: FontWeight.w400)),
                  onTap: () {},
                )
              ],
            ),
            Container(
              margin: EdgeInsets.only(top: 10),
              padding: EdgeInsets.all(10),
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(4),
                color: Color.fromRGBO(250, 249, 250, 1),
              ),
              child: Text(widget.titleStr,
                  style: TextStyle(fontSize: 14, color: Colors.black54,height: 1.7)),
            )
          ],
        ),
    );
  }
}
